<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
  <head>
    <meta charset="utf-8" />
    <meta name="generator" content="pandoc" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, user-scalable=yes"
    />
    <title>step_3</title>
    <style type="text/css">
      code {
        white-space: pre-wrap;
      }
      span.smallcaps {
        font-variant: small-caps;
      }
      span.underline {
        text-decoration: underline;
      }
      div.column {
        display: inline-block;
        vertical-align: top;
        width: 50%;
      }
    </style>
  </head>
  <body>
    <h2 id="step-3-ask-a-user-for-their-name-and-age.">
      Step 3: Ask a user for their name and age.
    </h2>
    <p>
      Write code to tell them how many years you are older than them (negative
      numbers for younger is fine at this point instead of older / younger with
      only positive numbers).
    </p>
    <pre><code>&gt;&gt;&gt; my_age = 47
&gt;&gt;&gt; response = input(&quot;How old are you? &quot;)
How old are you? 53
&gt;&gt;&gt; their_age = int(response)
&gt;&gt;&gt; diff = their_age - my_age
&gt;&gt;&gt; print(f&#39;Great age! You are {diff} years older than me.&#39;)
Great age! You are 6 years older than me.</code></pre>
  </body>
</html>
